home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_11_07
/
1107122a
< prev
next >
Wrap
Text File
|
1993-05-05
|
412b
|
26 lines
//
// list.h - list interface using a nested class
// with member definitions outside the nested class
//
class list
{
public:
list(unsigned n);
~list();
void add(unsigned n);
void print();
private:
struct node
{
node(unsigned n, node *p);
unsigned number;
node *next;
};
node *first, *last;
};
inline list::node::node(unsigned n, node *p)
: number(n), next(p) { }